home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 27 / CDROM27.iso / share / progra / mai / Add-Ins, Manipulating font on forms or controls < prev    next >
Encoding:
Text File  |  1997-07-31  |  952 b   |  20 lines

  1. 'Description: Manipulate the font settings of a control or form with an Add-In 
  2.  
  3. 'Place the following code in under a command button or in a menu, etc...
  4.  
  5.         Dim currentform As Object
  6.         Dim c As Object
  7.         Set currentform = gobjIDEAppInst.ActiveProject.ActiveForm
  8.         'add-in adds a label to the currentform
  9.         Set c = currentform.ControlTemplates.Add("label")
  10.         With c
  11.              .Properties("Caption") = "Xtreme Software. The Creators of Digital Poetry!"
  12.              .Properties("Font")!Bold = True
  13.              .Properties("Font")!Italic = True
  14.              .Properties("Font")!Strikethrough = False
  15.              .Properties("Font")!Underline = True
  16.              .Properties("Font")!Name = "Arial"
  17.              .Properties("Font")!Size = 10
  18.              .Properties("Autosize") = True
  19.              .Properties("left") = (currentform.Properties("width") - .Properties("width")) / 2
  20.         End With